/********************************************
 * 功能说明: 
 * 模块名称: 
 * 系统名称: 
 * 软件版权: 北京银杉金服科技有限公司
 * 系统版本: 1.0.0
 * 开发人员: zhangfb
 * 开发时间: 2018/8/22 22:33
 * 审核人员: 
 * 相关文档: 
 * 修改记录: 修改日期 修改人员 修改说明
 *********************************************/
package com.hyacinth.constant;

/**
 * 系统常量
 *
 * @author zhangfb
 * @version 1.0.0.1
 * @since JDK 1.8
 */
public class GlobalConstant {

    /**
     * 未登录时系统匿名字符串
     */
    public static final String ANONYMOUS_USER = "anonymousUser";

    /**
     * 系统禁止访问角色
     */
    public static final String ROLE_SYSTEM_BAN_ACCESS = "ROLE_SYSTEM_BAN_ACCESS";

    public static final String UNKNOWN = "unknown";

    public static final String X_FORWARDED_FOR = "X-Forwarded-For";
    public static final String X_REAL_IP = "X-Real-IP";
    public static final String PROXY_CLIENT_IP = "Proxy-Client-IP";
    public static final String WL_PROXY_CLIENT_IP = "WL-Proxy-Client-IP";
    public static final String HTTP_CLIENT_IP = "HTTP_CLIENT_IP";
    public static final String HTTP_X_FORWARDED_FOR = "HTTP_X_FORWARDED_FOR";


    public static final String LOCALHOST_IP = "127.0.0.1";
    public static final String LOCALHOST_IP_16 = "0:0:0:0:0:0:0:1";
    public static final int MAX_IP_LENGTH = 15;

    public static final String DEV_PROFILE = "dev";
    public static final String TEST_PROFILE = "test";
    public static final String PRO_PROFILE = "pro";
    public static final int TWO_INT = 2;
    public static final int M_SIZE = 1024;
    public static final String ROOT_PREFIX = "yunpi";

    public static final int EXCEPTION_CAUSE_MAX_LENGTH = 2048;
    public static final int EXCEPTION_MESSAGE_MAX_LENGTH = 2048;


    /**
     * 资源分类：system-子系统 module-子模块 catalog-目录 menu-菜单 func-功能 btn-按钮
     */
    public static final String RESOURCE_SYSTEM = "system";
    public static final String RESOURCE_MODULE = "module";
    public static final String RESOURCE_CATALOG = "catalog";
    public static final String RESOURCE_MENU = "menu";
    public static final String RESOURCE_FUNC = "func";
    public static final String RESOURCE_BTN = "btn";
    public static final String RESOURCE_HTML = "html";

    /*
    * 资源级别定义
    */
    public static final int RESOURCE_LEVEL_1 = 1;//一级资源，系统级别
    public static final int RESOURCE_LEVEL_2 = 2;//二级资源，模块级别
    public static final int RESOURCE_LEVEL_3 = 3;//3级资源，目录级别
    public static final int RESOURCE_LEVEL_4 = 4;//4级资源，菜单级别
    public static final int RESOURCE_LEVEL_5 = 5;//5级资源，按钮或功能级别


    /** 全局用户名 */
    public static final String CURRENT_USER = "CURRENT_USER";

    /**
     * 超级管理员的用户ID
     */
    public static final Long SUPER_MANAGER_USER_ID = 1L;
    /**
     * 超级管理员的用户编号
     */
    public static final String SUPER_MANAGER_LOGIN_NAME = "admin";
    /**
     * 超级管理员角色ID
     */
    public static final Long SUPER_MANAGER_ROLE_ID = 1L;
    /**
     * 超级管理员组织ID
     */
    public static final Long SUPER_MANAGER_GROUP_ID = 1L;
    /**
     * 运营工作台ID
     */
    public static final Long OPER_APPLICATION_ID = 1L;

    /**
     * The constant MENU_ROOT.
     */
    public static final String MENU_ROOT = "root";

    /**
     * The constant DEFAULT_FILE_PATH.
     */
    public static final String DEFAULT_FILE_PATH = "yunpi/file/";

    /**
     * redis key default expire = 1MINUTES
     */
    public static final long REDIS_DEFAULT_EXPIRE = 1L;

    /**
     * 登入url前缀
     */
    public static final String LOGIN_URL_PREFIX= "/login";

    /**
     * 登出url前缀
     */
    public static final String LOGOUT_URL_PREFIX= "/logout";

}
